version 1.0

task getDate {
    command {
        date
    }
    runtime {
        docker: "blcdsdockerregistry/samtools:1.15.1"
    }
    output {
        String curDate = read_string(stdout())
    }
}

task countWord {
    input {
        String date
        File inputFile
    }
    command {
        wc ${inputFile}
        echo ${date}
    }
    output {
        String outStr = read_string(stdout())
    }
}

workflow runDocker {
    input {
        File inputFile
    }
    call getDate
    call countWord {
        input:
            date = getDate.curDate,
            inputFile = inputFile
    }
    output {
        String getDateOut = getDate.curDate
        String getCountOut = countWord.outStr
    }
}